<%- STARTUP_ENTRYPOINT %> = <%- basicFunction("result, chunkIds, fn") %> {
  // arguments: chunkIds, moduleId are deprecated
  var moduleId = chunkIds;
  if (!fn) chunkIds = result, fn = <%- returningFunction("$$RUNTIME_GLOBAL_REQUIRE$$($$RUNTIME_GLOBAL_ENTRY_MODULE_ID$$ = moduleId)", "") %>
  return Promise.all(chunkIds.map(<%- ENSURE_CHUNK %>, <%- REQUIRE %>)).then(<%- basicFunction("") %> {
      var r = fn();
      return r === undefined ? result : r;
  });
}